package com.itshidu.jiaowu.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itshidu.jiaowu.entity.StudentClasses;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author XiaZengming123
 * @since 2019-07-08
 */
@Mapper
public interface StudentClassesMapper extends BaseMapper<StudentClasses> {


    @Select("select * from student_classes where classes_id=#{id}")
    List<StudentClasses> SelectByClassid(Long id);

    @Select("select * from student_classes where classes_id=#{id}")
    List<StudentClasses> SelectStuclasByClasId(Long id);

    @Update("update student_classes set classes_id =#{clasid} where id =#{id}")
    void updateClassByClassid(Long id,Long clasid);

}
